package com.test.demo.repository;

import com.test.demo.model.Student;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

@Repository
public class HelloRepository {
    @Autowired
    @Qualifier("st1")
    private Student student1;

    @Resource(name = "st2")
    private Student student2;

    public void getStudent1(){
        System.out.println(student1);
    }

    public void getStudent2(){
        System.out.println(student2);
    }
    public void print(){
        System.out.println("hello,repository");
    }
}
